arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
string = "这是一个字符串,哈哈哈"
ending = ['st', 'nd', 'ed'] + 17 * ['th'] + \
    ['st', 'nd', 'rd'] + 7 * ['th'] + \
    ['st']

# 索引
print(arr[3])
day = int(input('今天是几号:'))
print('今天是' + str(day) + ending[day-1])


# 切片 [初始索引:结束索引]
print(string[2:6])
print(ending[:3])
print(ending[26:])
print(ending[-1:])
print(string[1:-1])
# 更大的切片 [起始索引:结束索引:步长]
print(arr[0:5:2])
print(arr[::3])
print(arr[::-2])    # 倒着来


# 序列相加
print([1, 2, 3] + [4, 5, 6])


# 乘法
print('string' * 5)
print(['1'] * 5)


# 空列表
print([])
# 长度为 10 的空列表 (None 可用于初始化)
print([None] * 10)


# 成员资格
print('哈' in string)
print('test' in string)
print(1 in arr)


# 长度
print(len(arr))
print(max(arr))
print(min(arr))

